
import java.io.*;
import java.util.*;

public class ClientPhysique 
	implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String nom;
	private String prenom;
	private String adresse;
	private GregorianCalendar dateNaissance;
	
	private HashSet<ComptePerso> comptes; 

	public ClientPhysique(String n, String p, String ad, GregorianCalendar dn) {
		this.setNom(n);
		this.setPrenom(p);
		this.setDateNaissance(dn);
		this.setAdresse(ad);
		this.setComptes(new HashSet<ComptePerso>());
	}
	
	public void setNom(String n)
	{nom = n;}
	
	public void setPrenom(String p)
	{prenom = p;}
	
	public void setDateNaissance(GregorianCalendar d)
	{dateNaissance = d;}
	
	public void setAdresse(String ad)
	{adresse = ad;}
	
	public void setComptes(HashSet<ComptePerso> c)
	{comptes = c;}
	
	
	public String getNom(){return (nom);};
	
	public String getPrenom(){return (prenom);};
	
	public String getAdresse(){return (adresse);};
	
	public GregorianCalendar getDateNaissance() {return (dateNaissance);}
	
	public HashSet<ComptePerso> getComptes() {return (comptes);}
	
	public int getNbComptes() {return (getComptes().size());}
	
	public void rajoutCompte(ComptePerso c) {
		this.lierComptePerso(c);
	}
	
	private void lierComptePerso(ComptePerso c){
		comptes.add(c);
	}

}

